<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>修改病人页面</title>
    <link rel="stylesheet" th:href="@{/css/bootstrap.min.css}" />
    <link rel="stylesheet" th:href="@{/css/style1.css}" />
    <link rel="stylesheet" th:href="@{/css/style.css}" />
</head>
<style>
    label{
        text-align: center;
    }
    .form-group{
        margin-top: 10px;
    }
</style>
<body>
<div th:include="admin/header1"></div>
<main id="main">
    <section class="breadcrumbs">
        <div class="container">
            <div class="d-flex justify-content-between align-items-center">
                <ol>
                    <li><a href="#">首页</a></li>
                    <li><a href="#">编辑病人信息</a></li>
                </ol>
            </div>
        </div>
    </section>
    <section class="inner-page">
        <div class="container">
            <div class="card">
                <div class="card-header">
                    <h3 class="card-title mb-1">修改患者信息</h3>
                </div>
                <div class="card-body">
                    <a th:href="@{/user/selectAllUsersByPage?currentPage=1}" class="btn btn-success float-right  "
                       style="font-size: 10px;width: 50px; margin: 10px;">返回</a>
    <form th:action="@{/user/update}"
          name="myform" method="post"
          th:object="${user}"
          class="form-horizontal"
          enctype="multipart/form-data">
        <div class="form-group d-flex">
            <label class="col-sm-2 col-md-2 control-label">病人名字:</label>
            <div class="col-sm-4 col-md-4">
                <input type="text" class="form-control"
                       placeholder="请输入医生名字"
                       th:field="*{name}"/>
                <input type="hidden" name="id" id="id" th:value="${user.id}"/>
            </div>
            <label class="col-sm-2 col-md-2 control-label">病人电话:</label>
            <div class="col-sm-4 col-md-4">
                <input type="text" class="form-control"
                       placeholder="请输入电话"
                       th:field="*{phone}"/>
            </div>
        </div>

        <div class="form-group d-flex">
            <label class="col-sm-2 col-md-2 control-label">病人密码:</label>
            <div class="col-sm-4 col-md-4">
                <input type="text" class="form-control"
                       placeholder="请输入病人密码"
                       th:field="*{pwd}"/>
            </div>
            <label class="col-sm-2 col-md-2 control-label">病人性别:</label>
            <div class="col-sm-4 col-md-4">
                <select class="form-control" th:field="*{sex}">
                    <option value="" disabled selected>请选择病人性别</option>
                    <option value="男">男</option>
                    <option value="女">女</option>
                </select>
            </div>
        </div>

        <div class="form-group d-flex">
            <label class="col-sm-2 col-md-2 control-label">出生日期:</label>
            <div class="col-sm-4 col-md-4">
                <input type="date" class="form-control"
                       th:field="*{birthday}"/>
            </div>
            <label class="col-sm-2 col-md-2 control-label">病人地址:</label>
            <div class="col-sm-4 col-md-4">
                <input type="text" class="form-control"
                       placeholder="请输入病人地址"
                       th:field="*{address}"/>
            </div>
        </div>
        <div class="form-group d-flex">
            <label class="col-sm-2 col-md-2 control-label">身份证号:</label>
            <div class="col-sm-4 col-md-4">
                <input type="text" class="form-control"
                       placeholder="请输入病人身份证"
                       th:field="*{cno}"/>
            </div>
            <label class="col-sm-2 col-md-2 control-label">病人余额:</label>
            <div class="col-sm-4 col-md-4">
                <input type="number" class="form-control"
                       placeholder="请输入病人余额"
                       th:field="*{balance}"/>
            </div>
        </div>
        <div class="form-group d-flex">
            <label class="col-sm-2 col-md-2 control-label">病人头像:</label>
            <div class="col-sm-4 col-md-4">
                <input type="file" placeholder="请选择图片"  class="form-control" name="fileName"/>
                <img th:src=" ${user.tx}"
                     style="height: 50px; width: 50px; display: block;">
                <input type="hidden" name="tx" id="tx" th:field="${user.tx}"/>
            </div>
        </div>
        <div class="form-group text-center">
                <button type="submit"class="btn" >修改</button>
                <button type="reset" class="btn1  btn" >重置</button>
        </div>
    </form>
                </div>
</div>
        </div>
    </section>
</main>
</body>
</html>